$(document).ready(function () {
    $('a[data-toggle=collapse]').click(function () {
        if ($(this).find('i').hasClass('icon-chevron-up')) {
            $(this).find('i').attr({'class':'icon-chevron-down'})
        } else {
            $(this).find('i').attr({'class':'icon-chevron-up'})
        }
    })
})

function dropzone () {
    $(document).bind('dragover', function (e) {
        var dropZone = $('#dropzone'),
            timeout = window.dropZoneTimeout;
        if (!timeout) {
            dropZone.addClass('in');
        } else {
            clearTimeout(timeout);
        }
        if (e.target === dropZone[0]) {
            dropZone.addClass('hover');
        } else {
            dropZone.removeClass('hover');
        }
        window.dropZoneTimeout = setTimeout(function () {
            window.dropZoneTimeout = null;
            dropZone.removeClass('in hover');
        }, 100);
    });
}